package org.apache.commons.httpclient;

public class HttpVersion
  implements Comparable
{
  public static final HttpVersion HTTP_0_9 = new HttpVersion(0, 9);
  public static final HttpVersion HTTP_1_0 = new HttpVersion(1, 0);
  public static final HttpVersion HTTP_1_1 = new HttpVersion(1, 1);
  private int major = 0;
  private int minor = 0;

  public HttpVersion(int paramInt1, int paramInt2)
  {
    if (paramInt1 < 0)
      throw new IllegalArgumentException("HTTP major version number may not be negative");
    this.major = paramInt1;
    if (paramInt2 < 0)
      throw new IllegalArgumentException("HTTP minor version number may not be negative");
    this.minor = paramInt2;
  }

  // ERROR //
  public static HttpVersion parse(String paramString)
    throws ProtocolException
  {
    // Byte code:
    //   0: aload_0
    //   1: ifnonnull +13 -> 14
    //   4: new 33	java/lang/IllegalArgumentException
    //   7: dup
    //   8: ldc 48
    //   10: invokespecial 38	java/lang/IllegalArgumentException:<init>	(Ljava/lang/String;)V
    //   13: athrow
    //   14: aload_0
    //   15: ldc 50
    //   17: invokevirtual 56	java/lang/String:startsWith	(Ljava/lang/String;)Z
    //   20: ifne +30 -> 50
    //   23: new 44	ProtocolException
    //   26: dup
    //   27: new 58	java/lang/StringBuffer
    //   30: dup
    //   31: invokespecial 59	java/lang/StringBuffer:<init>	()V
    //   34: ldc 61
    //   36: invokevirtual 65	java/lang/StringBuffer:append	(Ljava/lang/String;)Ljava/lang/StringBuffer;
    //   39: aload_0
    //   40: invokevirtual 65	java/lang/StringBuffer:append	(Ljava/lang/String;)Ljava/lang/StringBuffer;
    //   43: invokevirtual 69	java/lang/StringBuffer:toString	()Ljava/lang/String;
    //   46: invokespecial 70	ProtocolException:<init>	(Ljava/lang/String;)V
    //   49: athrow
    //   50: ldc 50
    //   52: invokevirtual 74	java/lang/String:length	()I
    //   55: istore_1
    //   56: aload_0
    //   57: ldc 76
    //   59: iload_1
    //   60: invokevirtual 80	java/lang/String:indexOf	(Ljava/lang/String;I)I
    //   63: istore_2
    //   64: iload_2
    //   65: bipush 255
    //   67: if_icmpne +30 -> 97
    //   70: new 44	ProtocolException
    //   73: dup
    //   74: new 58	java/lang/StringBuffer
    //   77: dup
    //   78: invokespecial 59	java/lang/StringBuffer:<init>	()V
    //   81: ldc 82
    //   83: invokevirtual 65	java/lang/StringBuffer:append	(Ljava/lang/String;)Ljava/lang/StringBuffer;
    //   86: aload_0
    //   87: invokevirtual 65	java/lang/StringBuffer:append	(Ljava/lang/String;)Ljava/lang/StringBuffer;
    //   90: invokevirtual 69	java/lang/StringBuffer:toString	()Ljava/lang/String;
    //   93: invokespecial 70	ProtocolException:<init>	(Ljava/lang/String;)V
    //   96: athrow
    //   97: aload_0
    //   98: iload_1
    //   99: iload_2
    //   100: invokevirtual 86	java/lang/String:substring	(II)Ljava/lang/String;
    //   103: invokestatic 92	java/lang/Integer:parseInt	(Ljava/lang/String;)I
    //   106: istore 4
    //   108: iload_2
    //   109: iconst_1
    //   110: iadd
    //   111: istore 5
    //   113: aload_0
    //   114: invokevirtual 74	java/lang/String:length	()I
    //   117: istore 6
    //   119: aload_0
    //   120: iload 5
    //   122: iload 6
    //   124: invokevirtual 86	java/lang/String:substring	(II)Ljava/lang/String;
    //   127: invokestatic 92	java/lang/Integer:parseInt	(Ljava/lang/String;)I
    //   130: istore 8
    //   132: new 2	org/apache/commons/httpclient/HttpVersion
    //   135: dup
    //   136: iload 4
    //   138: iload 8
    //   140: invokespecial 19	org/apache/commons/httpclient/HttpVersion:<init>	(II)V
    //   143: areturn
    //   144: astore_3
    //   145: new 44	ProtocolException
    //   148: dup
    //   149: new 58	java/lang/StringBuffer
    //   152: dup
    //   153: invokespecial 59	java/lang/StringBuffer:<init>	()V
    //   156: ldc 94
    //   158: invokevirtual 65	java/lang/StringBuffer:append	(Ljava/lang/String;)Ljava/lang/StringBuffer;
    //   161: aload_0
    //   162: invokevirtual 65	java/lang/StringBuffer:append	(Ljava/lang/String;)Ljava/lang/StringBuffer;
    //   165: invokevirtual 69	java/lang/StringBuffer:toString	()Ljava/lang/String;
    //   168: invokespecial 70	ProtocolException:<init>	(Ljava/lang/String;)V
    //   171: athrow
    //   172: astore 7
    //   174: new 44	ProtocolException
    //   177: dup
    //   178: new 58	java/lang/StringBuffer
    //   181: dup
    //   182: invokespecial 59	java/lang/StringBuffer:<init>	()V
    //   185: ldc 96
    //   187: invokevirtual 65	java/lang/StringBuffer:append	(Ljava/lang/String;)Ljava/lang/StringBuffer;
    //   190: aload_0
    //   191: invokevirtual 65	java/lang/StringBuffer:append	(Ljava/lang/String;)Ljava/lang/StringBuffer;
    //   194: invokevirtual 69	java/lang/StringBuffer:toString	()Ljava/lang/String;
    //   197: invokespecial 70	ProtocolException:<init>	(Ljava/lang/String;)V
    //   200: athrow
    //
    // Exception table:
    //   from	to	target	type
    //   97	108	144	java/lang/NumberFormatException
    //   119	132	172	java/lang/NumberFormatException
  }

  public int compareTo(Object paramObject)
  {
    return compareTo((HttpVersion)paramObject);
  }

  public int compareTo(HttpVersion paramHttpVersion)
  {
    if (paramHttpVersion == null)
      throw new IllegalArgumentException("Version parameter may not be null");
    int i = getMajor() - paramHttpVersion.getMajor();
    if (i == 0)
      i = getMinor() - paramHttpVersion.getMinor();
    return i;
  }

  public boolean equals(Object paramObject)
  {
    if (this == paramObject);
    for (boolean bool = true; ; bool = equals((HttpVersion)paramObject))
      while (true)
      {
        return bool;
        if (paramObject instanceof HttpVersion)
          break;
        bool = false;
      }
  }

  public boolean equals(HttpVersion paramHttpVersion)
  {
    if (compareTo(paramHttpVersion) == 0);
    for (int i = 1; ; i = 0)
      return i;
  }

  public int getMajor()
  {
    return this.major;
  }

  public int getMinor()
  {
    return this.minor;
  }

  public boolean greaterEquals(HttpVersion paramHttpVersion)
  {
    if (compareTo(paramHttpVersion) >= 0);
    for (int i = 1; ; i = 0)
      return i;
  }

  public int hashCode()
  {
    return (100000 * this.major + this.minor);
  }

  public boolean lessEquals(HttpVersion paramHttpVersion)
  {
    if (compareTo(paramHttpVersion) <= 0);
    for (int i = 1; ; i = 0)
      return i;
  }

  public String toString()
  {
    StringBuffer localStringBuffer = new StringBuffer();
    localStringBuffer.append("HTTP/");
    localStringBuffer.append(this.major);
    localStringBuffer.append('.');
    localStringBuffer.append(this.minor);
    return localStringBuffer.toString();
  }
}

/* Location:           E:\Desktop\Android\wordstd\classes_dex2jar.jar
 * Qualified Name:     org.apache.commons.httpclient.HttpVersion
 * JD-Core Version:    0.5.3
 */